import GraphBack from '../../src'
function draw() {
  document.querySelectorAll('.graph-background').forEach((ele) => drawBackground(ele))
}
window.addEventListener('resize', () => draw())

function drawBackground(ele) {
  const board = new GraphBack.Board(ele, { color: '#235fa7' })
  const rect = new GraphBack.Rect({ x: 5, y: 5, width: board.width - 25, height: board.height - 25, fill: false })
  const transform = new GraphBack.Transform(rect).array(3, 5, 5)
  board.add(transform)
  ele.style.background = board.getStyle()
}
